package com.itasura.chain.doctor;

import com.itasura.chain.AbstractWorkChain;
import com.itasura.chain.RegisterType;
import com.itasura.chain.Request;
import lombok.extern.slf4j.Slf4j;

/**
 * 内科门诊
 * @author sailor wang
 * @date 2018/8/27 下午3:04
 * @description
 */
@Slf4j
public class InternalChain extends AbstractWorkChain {
    @Override
    public void handleRequest(Request request) {
        if (request == null || !request.getIsRegister()){
            log.info("内科医生：请先挂号。");
            return;
        }
        if (!RegisterType.INTERNAL.equals(request.getRegisterType())){
            log.info("内科医生：你挂的不是内科！");
        }
        log.info("内科医生：各种xxxxx操作后，发现确实病了，");
        log.info("内科医生：表怕，我会终结你的看病链。我华佗在世、妙手回春。。。各种催牛逼");
        request.setIsSick(false);
        request.setDesc("老中医治好了我多年的老胃病，老牛逼了！！！");
        log.info("内科医生：OK了，病好了，无需在看其他门诊。");
    }
}